import { createHashRouter } from "react-router-dom"
import { menuList } from "./menu"
import App from "../App"
import Login from "../views/otherPage/Login"
import Home from "../views/otherPage/Home"
/* 配置路由表写法：[{ path, element, children }]  推荐
配置路由组件写法：<Route path=‘’ element={} /> */

const routes = [
    {
        path: '/',
        element:<App />,
        children: [
            {
                path: '',
                element: <Home />,
            },
            {
                path: 'login',
                element: <Login />,
            },
            ...menuList,
        ]
    }
]
const router = createHashRouter(routes)
export default router